import { request } from '@/plugins'

export const loginApi = (data: any) => request({ method: 'POST', url: '/api/login', data })

export const logoutApi = (data: any) => request({ method: 'DELETE', url: '/api/v1/rule/logout', data })

export const getUserListApi = (params: any) => request({ method: 'GET', url: '/api/v1/rule/users', params })

export const addUserApi = (data: any) => request({ method: 'POST', url: '/api/v1/rule/users', data })

export const editUserApi = (data: any) => request({ method: 'PUT', url: '/api/v1/rule/users', data }) // 修改用户和重置密码共用接口

export const updatePasswordApi = (data: any) => request({ method: 'PUT', url: '/api/v1/rule/password', data })

export const delUserApi = (data: any) => request({ method: 'DELETE', url: '/api/v1/rule/users', data })